package com.itqf.controller;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * projectName: springmvcgp8
 *
 * @author: 赵伟风
 * time: 2021/8/6 16:24
 * description:
 */
@RestController
@RequestMapping("index")
@CrossOrigin("*")
public class IndexController  {


    @GetMapping(value = "login",produces = "application/json;charset=utf-8")
    public Object login(){

        Map<String,Object> map = new HashMap<>();
        map.put("code", 1);


        int i = 1/0;

        return map;
    }



    @GetMapping(value = "register",produces = "application/json;charset=utf-8")
    public Object register(){

        Map<String,Object> map = new HashMap<>();
        map.put("code", 2);

        int i = 1/0;

        return map;
    }
}
